home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / complib / cprodm1d.z / cprodm1d
Encoding:
Text File  |  1998-10-30  |  8.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ccccpppprrrrooooddddmmmm1111dddd,,,,zzzzpppprrrrooooddddmmmm1111dddd((((3333FFFF))))                                    ccccpppprrrrooooddddmmmm1111dddd,,,,zzzzpppprrrrooooddddmmmm1111dddd((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ccccpppprrrrooooddddmmmm1111dddd,,,, zzzzpppprrrrooooddddmmmm1111dddd ---- Compute the product of Multiple 1D Fourier
  10.      transforms with Multiple 1D filters.
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
  13.      _F_o_r_t_r_a_n :
  14.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccpppprrrrooooddddmmmm1111dddd(((( nnnn,,,,pppp,,,,aaaarrrrrrrraaaayyyy,,,,iiiinnnnccccaaaa,,,,llllddddaaaa,,,,ffffiiiilllltttteeeerrrr,,,,iiiinnnnccccffff,,,,llllddddffff))))
  15.           iiiinnnntttteeeeggggeeeerrrr   nnnn,,,, pppp,,,, iiiinnnnccccaaaa,,,, llllddddaaaa,,,, iiiinnnnccccffff,,,, llllddddffff
  16.           ccccoooommmmpppplllleeeexxxx   aaaarrrrrrrraaaayyyy((((llllddddaaaa,,,,pppp)))),,,, ffffiiiilllltttteeeerrrr((((llllddddffff,,,,pppp))))
  17.  
  18.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzpppprrrrooooddddmmmm1111dddd(((( nnnn,,,,pppp,,,,aaaarrrrrrrraaaayyyy,,,,iiiinnnnccccaaaa,,,,llllddddaaaa,,,,ffffiiiilllltttteeeerrrr,,,,iiiinnnnccccffff,,,,llllddddffff))))
  19.           iiiinnnntttteeeeggggeeeerrrr   nnnn,,,, pppp,,,, iiiinnnnccccaaaa,,,, llllddddaaaa,,,, iiiinnnnccccffff,,,, llllddddffff
  20.           ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx      aaaarrrrrrrraaaayyyy((((llllddddaaaa,,,,pppp)))),,,, ffffiiiilllltttteeeerrrr((((llllddddffff,,,,pppp))))
  21.  
  22.  
  23.      _C :
  24.      ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
  25.      iiiinnnntttt ccccpppprrrrooooddddmmmm1111dddd((((iiiinnnntttt nnnn,,,, iiiinnnntttt pppp,,,, ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,, iiiinnnntttt iiiinnnncccc,,,,iiiinnnntttt llllddddaaaa,,,,
  26.                     ccccoooommmmpppplllleeeexxxx ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt iiiinnnnccccffff,,,, iiiinnnntttt llllddddffff))));;;;
  27.      iiiinnnntttt zzzzpppprrrrooooddddmmmm1111dddd((((iiiinnnntttt nnnn,,,, iiiinnnntttt pppp,,,, zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt iiiinnnncccc,,,,iiiinnnntttt llllddddaaaa,,,,
  28.                     zzzzoooommmmpppplllleeeexxxx ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt iiiinnnnccccffff,,,, iiiinnnntttt llllddddffff))));;;;
  29.  
  30.  
  31. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  32.      ccccpppprrrrooooddddmmmm1111dddd and zzzzpppprrrrooooddddmmmm1111dddd compute the product of the Fourier transforms of P
  33.      complex sequences of N samples with the Fourier transforms of P complex
  34.      filters.  Note, the product of the Fourier transforms of two sequences is
  35.      equal to the Fourier transform of their convolution.
  36.  
  37.  
  38. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  39.      NNNN ---- Integer, the number of samples in each sequence.
  40.      Unchanged on exit.
  41.  
  42.      PPPP ---- Integer, the number of sequences.  Unchanged on exit.
  43.  
  44.      AAAARRRRRRRRAAAAYYYY ---- Array containing the Fourier Transform.  On exit, the array is
  45.      overwritten by the product.
  46.  
  47.      IIIINNNNCCCCAAAA ---- Integer, increment between two consecutive elements of the
  48.      sequence.  Unchanged on exit.
  49.  
  50.      LLLLDDDDAAAA ---- Integer, leading dimension: increment between the first samples of
  51.      two consecutive sequences.  Unchanged on exit.
  52.  
  53.      FFFFIIIILLLLTTTTEEEERRRR ---- Array containing the Fourier Transform of the filter(s).
  54.      Unchanged on exit.
  55.  
  56.      IIIINNNNCCCCFFFF ---- Integer, increment between two consecutive elements of the filter.
  57.      Unchanged on exit.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccpppprrrrooooddddmmmm1111dddd,,,,zzzzpppprrrrooooddddmmmm1111dddd((((3333FFFF))))                                    ccccpppprrrrooooddddmmmm1111dddd,,,,zzzzpppprrrrooooddddmmmm1111dddd((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      LLLLDDDDFFFF ---- Integer, leading dimension: increment between the first samples of
  75.      two consecutive filters.  Unchanged on exit.
  76.  
  77.  
  78. EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
  79.      Working on 64 sequences of 1024 complex values each.  We successively
  80.      apply a Direct Fourier Transform, the product with a SINGLE filter
  81.      transform, then an Inverse Fourier Transform-
  82.      Elements of each sequence are stored with increment (stride)1, and the
  83.      offset between the first element of two succesive sequences (leading
  84.      dimension) is 2049.
  85.      _F_o_r_t_r_a_n
  86.           complex array(0:2049-1,0:64-1),
  87.                   filter(0:2049-1,0:64-1), coeff(1024+15)
  88.           call cfftm1di( 1024, coeff)
  89.           call cfftm1d( -1, 1024, 64, array, 1, 2049, coeff)
  90.           ccccaaaallllllll ccccpppprrrrooooddddmmmm1111dddd(((( 1111000022224444,,,, 66664444,,,, aaaarrrrrrrraaaayyyy,,,, 1111,,,, 2222000044449999,,,, ffffiiiilllltttteeeerrrr,,,, 1111,,,, 0000))))
  91.           call cfftm1d(  1, 1024, 64, array, 1, 2049, coeff)
  92.  
  93.      _C
  94.           #include <fft.h>
  95.           complex array[64*2049], filter[2049], *coeff;
  96.           coeff = cfftm1di( 1024, NULL);
  97.           cfftm1d( -1, 1024, 64, array, 1, 2049, coeff);
  98.           ccccpppprrrrooooddddmmmm1111dddd(((( 1111000022224444,,,, 66664444,,,, aaaarrrrrrrraaaayyyy,,,, 1111,,,, 2222000044449999,,,, ffffiiiilllltttteeeerrrr,,,, 1111,,,, 0000))));;;;
  99.           cfftm1d( -1, 1024, 64, array, 1, 2049, coeff);
  100.  
  101.      NNNNOOOOTTTTEEEE____1111 :::: Using a 0 leading dimension for the filter is equivalent to
  102.      applying the same filter to all the input sequences.
  103.  
  104.      NNNNOOOOTTTTEEEE____2222 :::: As the FFTs are not normalized, a successive direct, then
  105.      inverse transform, scales the original input by the size of the sequence.
  106.      Rather than calling cscalm1d or zscalm1d to scale back the result, this
  107.      scaling factor could be directly applied to the filter transform, thus
  108.      saving some extra work.
  109.  
  110. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  111.      fft, cfftm1di, zfftm1di, cfftm1d, zfftm1d, cscalm1d, zscalm1d
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.